-- card: 13037 from stack: in.7 -- bmap block id: 13182 -- flags: 0000 -- background id: 10029 -- name: -- part contents for background part 11 ----- text ----- © Copyright Apple Computer Co, Inc. 1988 __________________________________________________________ These notes contain information of interest to stack designers and programmers that are not covered in the general HyperCard Version 1.2 Release Notes Stack. Features visible to the average user are described in the Release Notes Stack. The HyperCard version 1.2.1 Final Programmer's Notes include the following: • New HyperTalk synonyms. • New HyperTalk commands, properties and functions. • Using "peeking" for fast script review and editing. • Performance improvements in finding text and navigating stacks. • User-visible bug fixes. • Miscellaneous notes on write-protected media and stacks, and related design considerations. Briefly, HyperCard 1.2.1 includes the following new features: • On locked stacks, HyperCard 1.2.1 distinguishes between user actions and those of HyperTalk scripts. While users are prevented from making changes to a locked stack (unless the new property userModify is set to true), its scripts can perform most operations. Changes created in locked stacks are temporary-they disappear when the user leaves the card to which changes have been made. Specific restrictions imposed by locked media are explained in detail later in this document. • Performance and robustness in handling large stacks has been greatly improved. To take advantage of these improvements, stacks created with older versions of HyperCard should be compacted twice with version 1.2.1. • Pictures on cards and backgrounds can now be hidden and shown. New HyperTalk commands allow stack designers to hide or show art (just like buttons or fields) as part of a HyperTalk script. • Visual effects work with HyperTalk"s new Unlock Screen command. Stack designers may now have a button, field or picture appear or disappear with a visual effect rather than just "popping up." • Many HyperTalk synonyms, commands and properties have been added or extended. • HyperCard 1.2.1 allows fast access to HyperTalk scripts by "peeking." Users and designers may quickly view and edit scripts. __________________________________________________________ New HyperTalk Abbreviations: • cd = card (get the number of this cd) • bg = background (number of cards of this bg) • fld = field (hide fld 3) • cds = cards (number of cds) • bgs = backgrounds (number of bgs) • flds = fields (number of flds) • btns = buttons (number of btns) • second = seconds (wait 1 second) • sec = secs (wait 1 sec) • tick = ticks (wait 1 tick) • pict = picture (hide card pict) • grey = gray (dissolve to grey) __________________________________________________________ New HyperTalk Messages • returnInField This message is sent to the field when the Return key is pressed while there is an insertion point or selection in a field. If returnInField is not intercepted by a handler and the insertion point or selection is on the last line of the field, HyperCard will check to see if the field has "autoTab" set to true. If so, HyperCard sends a "tabKey" message to the current field. If the tabKey message is not intercepted by a handler, the cursor will move to the next field. If the insertion point or selection is not on the last line of the field, or if autoTab is false, a carriage return will be inserted in the text of the field. on returnInField -- when the Return key is pressed prevent insertion -- of carriage returns anywhere in the field end returnInField • enterInField The enterInField message is sent to a field when the Enter key is pressed while there is an insertion point or selection in a field. If enterInField is not intercepted by a handler and the contents of the field have been changed, HyperCard sends a closeField message. on enterInField -- when the enterKey is pressed find the field --contents in another stack get me go to stack "Address" find it end enterInField __________________________________________________________ New HyperTalk Commands • Find Whole "string to be found" Unlike the general Find command, Find Whole uses both word starts and word endings in finding the chosen text. Find Whole also uses space characters in the string. See the HyperCard Version 1.2 Release Notes stack for a description of Find Whole. • Find String "string to be found" Find String finds characters specified in a string, ignoring word boundaries. Find String "ple" -- would find the string of characters "ple" For strings without spaces, it works the same way as Find Chars. When a string has a space followed by at least three other characters, Find String uses HyperCard"s fast search algorithm. Find String "ple" offers the same performance as Find Chars "ple". Find String "ple comp" is much faster because the space and characters in "ple comp" invoke HyperCard"s fast search. • hide picture of This command will hide the card picture specified in the card expression. For example: on mouseUp hide picture of card 3 end mouseUp • hide picture of This command will hide the background picture specified in the background expression. For example: on mouseUp hide picture of background 3 end mouseUp • show picture of This command will show the card picture specified in the card expression. For example: on mouseUp show picture of card 3 end mouseUp • show picture of This command will show the background picture specified in the background expression. For example: on mouseUp show picture of background 3 end mouseUp • hide card picture This hides the picture on the current card. For example : on mouseUp hide card picture end mouseUp • show card picture This shows the picture on the current card. For example : on mouseUp show card picture end mouseUp • hide background picture This hides the picture of the current background. For example : on mouseUp hide background picture end mouseUp • show background picture This shows the picture of the current background. For example : on mouseUp show background picture end mouseUp • lock Screen The lock Screen command performs the same function as "set lockScreen to true." For example: on mouseUp lock screen end mouseUp • unlock Screen [with visual effect] The unlock Screen command performs basically the same function as "set lockScreen to false". In addition, unlock Screen can take a single visual effect as an argument. The visual effect is invoked as the screen is unlocked ("set lockScreen to false" doesn"t invoke visual effects). on mouseUp set lockScreen to true show card button 3 unlock screen with dissolve slowly end mouseUp Note: Visual effects cannot be compounded when using unlock Screen. The visual effects preceding the unlock Screen command shown below will not be executed until a Go command is encountered (or until HyperCard has sufficient idle time to flush them). on mouseUp set lockScreen to true show card button 3 visual effect barn door open -- not invoked by unlock Screen visual effect dissolve to black -- not invoked by unlock Screen unlock Screen with checkerboard end mouseUp In general, visual effects should be as close as possible to the Go command that will use them. Here is an example of multiple visual effects in a single script: on mouseUp visual effect zoom open -- will execute with the Go command go to next card lock screen show card field 3 unlock Screen with dissolve -- will work with the unlock Screen -- command end mouseUp • select